1. Field of the Invention
The present invention relates to an image reader wherein a document is read with an image sensor.
2. Description of the Prior Art
In an image reader, a document which should be read by an image sensor is placed on a platen glass of an image reader and is covered with a document cover. The document is illuminated by a light source, and the density of a line on the document, that is, the light reflected from the line on the document is detected by a one-dimensional image sensor (main scan). The density is converted to digital data by an analog-to-digital converter, and after correcting the shading thereof, the digital data are binarized according to a predetermined processing. Then, the binarized data are stored in a memory. Then, the image sensor scans a next line of the document (subscan). By scanning all lines on the document, an image of the document is read out.
In a subscan of a document, the starting point of the subscan should be determined. For example, a switch is set at the top of a document region where a document may exist, and the starting point of the subscan is determined as the moment that the switch is switched on due to the movement of the optical system. In another method, a switch is set at a fixed point, and the starting point is determined according to a predetermined time interval which has past from the moment that the switch was closed. In those methods, however, the starting point can not be determined accurately unless the switch is mounted with a high precision.
In an image reader disclosed in Japanese Examined Patent Publication No. 28182/1985, two movable markers are set along an edge of the platen glass in the subscan direction at the starting point and at the end point of the subscan, respectively. The markers have a color of a predetermined reflection density. The start and the end of the reading are controlled by detecting images of the markers. However, this method requires a setting mechanism for the markers, and the positions of the markers should be controlled each time.
Another problem of an image reader is that the level of reading of an image has to be changed because the level of the output signals of pixels of an image sensor such as a charge-coupled device and the gain of the amplifier for the output signals of charge-couple device are varied according to the temperature in the image sensor.
It is desirable that the fluctuations of the level of reading are corrected over a whole range of density, especially in the reading of a half-tone image.
Especially, the fluctuations in the zero level of pixels of the image sensor cause the fluctuations in the black level of the output image so that the image is reproduced very badly.
In Japanese Patent Laid Open Publication No. 172061/1983, the analog signal of a white color is corrected in a correction range determined by a peak value of the analog signal of the white. In Japanese Patent Laid Open Publication No. 184160/1983, a predetermined level such as the middle value is obtained from the two standard patterns of white and black, and the electric power supplied to the light source is controlled according to the comparison of the level with a standard value. However, the black level is not corrected in those methods.